<?php
class Sedes{
	
	private $sede_id;
	
	public function getAll(){
		$sql = "SELECT id_sede, nombre_sede, foto_estadio 
				FROM sedes";		
		
		$config = Zend_Registry::get('config');
		$db = Zend_Db::factory($config->database->adapter,$config->database->params);
		$sedes = $db->fetchAll($sql);		
		
		return $sedes;
		
	}
	
	public function getData($id){
		$sql = "SELECT *
				FROM sedes
				WHERE id_sede = $id";		
		
		$config = Zend_Registry::get('config');
		$db = Zend_Db::factory($config->database->adapter,$config->database->params);
		$sedes = $db->fetchAll($sql);		
		
		return $sedes;	}
	
}